package com.itboy.mall.pms.attrgroup.mapper;

import com.itboy.mall.pms.attrgroup.domain.MallAttrGroup;
import com.itboy.common.core.mybatisplus.core.BaseMapperPlus;
import com.itboy.common.core.mybatisplus.cache.MybatisPlusRedisCache;
import com.itboy.mall.pms.product.vo.SpuItemAttrGroupVo;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性分组Mapper接口
 *
 * @author itboy
 * @date 2021-07-17
 */
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
public interface MallAttrGroupMapper extends BaseMapperPlus<MallAttrGroup> {

	/**
	 * 获取规格参数
	 * @param spuId
	 * @param catalogId
	 * @return
	 */
	List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(@Param("spuId")Long spuId, @Param("catalogId")Long catalogId);
}
